package com.ldk.base.framework.datasource;

import com.atomikos.jdbc.AtomikosDataSourceBean;

/**
 * 自定义AtomikosDataSourceBean
 * @author xiangwl
 *
 */
public class CustomXADataSource extends AtomikosDataSourceBean {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8075329415526222558L;

	public CustomXADataSource(String uniqueResourceName){
		this.setUniqueResourceName(uniqueResourceName);
		this.setMinPoolSize(1);
		this.setMaxPoolSize(1000);
		this.setBorrowConnectionTimeout(0);
		this.setMaxIdleTime(30);
		this.setReapTimeout(30);
		this.setMaintenanceInterval(30);//连接回收时间，30秒
		this.setTestQuery("select 1");
		this.setMaxLifetime(60);//
	}
}
